
#include "member_BTimer.h"
#include "member_BObject.h"

using namespace BWE;

member_BTimer::member_BTimer(BTimer* clock)
{
	boss = clock;
	interval = 1000;
	count = -1;
	started = false;

#ifdef _LINUX_
	timer = 0;
#endif

#ifdef _WINDOWS_SYSTEM_
	handle = 0;
#endif
}
member_BTimer::~member_BTimer()
{

}

#ifdef _WINDOWS_SYSTEM_
void member_BTimer::procEvent(UINT uMsg, DWORD dwTime)
{
	boss->emit(Signal_TimeOut);
	if (count > 0)
		count--;
	if (count == 0)
	{
		KillTimer(0, handle);
		handle = 0;
	}
}
#endif
